package com.bolt.core.view.tag;


import com.bolt.common.utils.SpringContextUtil;
import com.bolt.core.view.components.ComponentsBase;
import com.bolt.core.view.components.YearSelect;

public class YearSelectTag extends InputTag {

    private static final long serialVersionUID = 1L;

    private int start = 2000;

    private int end = 2020;

    public int getEnd() {
        return end;
    }

    public void setEnd(int end) {
        this.end = end;
    }

    public int getStart() {
        return start;
    }

    public void setStart(int start) {
        this.start = start;
    }

    @Override
    public ComponentsBase getUI() {
        YearSelect select = new YearSelect();
        SpringContextUtil.inject(select);
        return select;
    }

    @Override
    protected void populateParams() {
        super.populateParams();
        component.addParameter("start", start);
        component.addParameter("end", end);
    }

}
